#!/usr/bin/env python3
# -*- coding:utf-8 -*-
from page.webpage import WebPage, sleep

class BklzPage(WebPage):
    """搜索类"""
    loginEles=eles.bklz
    def input_username(self, content):
        """输入用户名"""
        self.input_text(loginEles.usernameBox, txt=content)
        sleep()

    def input_password(self, content):
        """输入密码"""
        self.input_text(loginEles.passwordBox, txt=content)
        sleep()

    def assert_success(self):
        return self.is_displayed(loginEles.nextBtn)

    def assert_failure(self):
        try:
            self.find_element(loginEles.loginBtn)
            return True
        except:
            return False


    # @property
    # def imagine(self):
    #     """搜索联想"""
    #     return [x.text for x in self.find_elements(loginEles.passwordBox)]

    def click_loginBtn(self):
        """点击搜索"""
        self.is_click(loginEles.loginBtn)


if __name__ == '__main__':
    pass
